bpf: Restrict kernel image access functions when the kernel is locked down
authorLee, Chun-Yi <jlee@suse.com>
Wed, 5 Apr 2017 16:40:31 +0000 (17:40 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 19 Jun 2017 23:25:45 +0000 (00:25 +0100)
commit51423f76407f935b04b8df17e0bb06a15e715f04
tree8b50d4022de8c1605e648effc6ea2cbaff6ede5a
parent4fcc4847ba7a0828a55dc500c3229153c4806217
bpf: Restrict kernel image access functions when the kernel is locked down

There are some bpf functions can be used to read kernel memory:
bpf_probe_read, bpf_probe_write_user and bpf_trace_printk.  These allow
private keys in kernel memory (e.g. the hibernation image signing key) to
be read by an eBPF program.  Prohibit those functions when the kernel is
locked down.

Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Gbp-Pq: Topic features/all/lockdown
Gbp-Pq: Name 0058-bpf-Restrict-kernel-image-access-functions-when-the-.patch
kernel/trace/bpf_trace.c